import request from '@/utils/request'

// 查询合同产品关系列表
export function listContractProduct(query) {
  return request({
    url: '/crm/contractProduct/list',
    method: 'get',
    params: query
  })
}

// 查询合同产品关系详细
export function getContractProduct(rId) {
  return request({
    url: '/crm/contractProduct/' + rId,
    method: 'get'
  })
}

// 新增合同产品关系
export function addContractProduct(data) {
  return request({
    url: '/crm/contractProduct',
    method: 'post',
    data: data
  })
}

// 修改合同产品关系
export function updateContractProduct(data) {
  return request({
    url: '/crm/contractProduct',
    method: 'put',
    data: data
  })
}

// 删除合同产品关系
export function delContractProduct(rId) {
  return request({
    url: '/crm/contractProduct/' + rId,
    method: 'delete'
  })
}

// 导出合同产品关系
export function exportContractProduct(query) {
  return request({
    url: '/crm/contractProduct/export',
    method: 'get',
    params: query
  })
}